<!--{template header}-->

<!--{if $_GET[op]=='manage'}-->

<!--{if $_GET['subop'] == 'member'}-->

	<!--{if !$_SGLOBAL[inajax]}-->
	<div id="$_GET[uid]" class="inpage">
	<!--{else}-->
	
	<h1>管理群组成员</h1>
	<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>
	<div id="$_GET[uid]" class="popupmenu_inner">
	<!--{/if}-->

<!--{else}-->

	<h2 class="title"><img src="image/app/mtag.gif" />群组 - $mtag[tagname]</h2>
	<div class="tabs_header">
		<ul class="tabs">
		<!--{if $mtag['grade'] >= 8}-->
			<li$actives[base]><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=base"><span>基本设置</span></a></li>
		<!--{/if}-->
		<!--{if $mtag['allowinvite']}-->
			<li$actives[invite]><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=invite"><span>邀请好友</span></a></li>
		<!--{/if}-->
		<!--{if $mtag['grade'] >= 8}-->
			<li$actives[members]><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=members"><span>成员管理</span></a></li>
			<li$actives[thread]><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=thread"><span>话题批量管理</span></a></li>
		<!--{/if}-->
		<li><a href="space.php?do=mtag&tagid=$mtag[tagid]"><span>返回群组首页</span></a></li>
		</ul>
		<!--{if ($actives[members] || $mtag['allowinvite']) && ($_GET['subop'] == 'invite' || $_GET['subop'] == 'members')}-->
		<script>
			function searchUser() {
				$('searchform').submit();
			}
		</script>
		<form name="searchform" id="searchform" method="get" action="cp.php">
			<div style="float:right;margin:0 6px 5px 0;">
				<table cellspacing="0" cellpadding="0">
					<tr>
						<td style="padding: 0;"><input type="text" id="key" name="key" value="搜索成员" onfocus="if(this.value=='搜索成员')this.value='';" class="t_input" tabindex="1" style="width: 160px; border-right: none;" /></td>
						<td style="padding: 0;"><a href="javascript:searchUser();"><img src="image/search_btn.gif" alt="搜索" /></a></td>
					</tr>
				</table>
			</div>
			<input type="hidden" name="ac" value="mtag">
			<input type="hidden" name="op" value="manage">
			<input type="hidden" name="tagid" value="$mtag[tagid]">
			<input type="hidden" name="subop" value="$_GET[subop]">
			<input type="hidden" name="uid" value="$_GET[uid]">
			<input type="hidden" name="grade" value="$_GET[grade]">
			<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
		</form>
		<!--{/if}-->
	</div>
	
<!--{/if}-->

<form id="manageform" name="manageform" method="post" action="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=$_GET[subop]&uid=$_GET[uid]&grade=$_GET[grade]&group=$_GET[group]&page=$_GET[page]&start=$_GET[start]">
	
<!--{if $_GET['subop'] == 'base'}-->

	<table cellspacing="4" cellpadding="4" class="formtable">
	<tr>
		<th width="100">群组名</th>
		<td>$mtag[tagname]</td>
	</tr>
	<tr>
		<th width="100"><label for="pic">封面图片</label></th>
		<td><input id="pic" type="text" name="pic" value="$mtag[pic]" size="80" class="t_input" /><br />请输入 http:// 开头的图片URL地址</td>
	</tr>
	<tr>
		<th>
			<label for="announcement">群组公告</label>
		</th>
		<td>
			<textarea id="announcement" name="announcement" cols="80" rows="5">$mtag[announcement]</textarea>
			<p class="gray">最多可以输入<strong>200</strong> 个字符,多出的部分将被自动删除</p>	
		</td>
	</tr>
	
	<!--{if $mtag[grade]==9}-->
	<!--{if $field['manualmember']}-->
	<tr>
		<th width="100">加入权限</th>
		<td>
			<select name="joinperm">
			<option value="0"$joinperms[0]>公开(允许所有人可加入)</option>
			<option value="1"$joinperms[1]>审核(需要经批准后才可加入)</option>
			<option value="2"$joinperms[2]>私密(只允许群主邀请加入)</option>
			</select>
		</td>
	</tr>
	<!--{else}-->
	<tr>
		<th width="100">加入权限</th>
		<td>公开(允许所有人可加入)</td>
	</tr>
	<!--{/if}-->
	<tr>
		<th width="100">浏览权限</th>
		<td>
			<select name="viewperm">
			<option value="0"$viewperms[0]>公开(所有人可浏览)</option>
			<option value="1"$viewperms[1]>封闭(只对会员可见)</option>
			</select>
			<br>为了保护隐私，当群组的浏览权限设置为封闭时，成员的发帖或回帖操作将不产生个人动态。
		</td>
	</tr>
	<tr>
		<th>招纳群主</th>
		<td>
			<input type="radio" name="closeapply" value="0" $closeapply[0]/> 开启
			<input type="radio" name="closeapply" value="1" $closeapply[1]/> 关闭
		</td>
	</tr>
	<!--{/if}-->
	
	<tr>
		<th>&nbsp;</th>
		<td>
		<input type="submit" name="basesubmit" value="提交保存" class="submit" />&nbsp;
		</td>
	</tr>
	</table>
	
<!--{elseif $_GET['subop'] == 'thread'}-->
	
	<table cellspacing="0" cellpadding="0" class="formtable">
	<tr>
		<td>
		请登录管理平台，来对群组的话题、回帖进行批量删除、精华、置顶等操作。<br>
		<br><a href="admincp.php?ac=thread&&perpage=20&tagid=$mtag[tagid]&searchsubmit=1" class="submit">话题管理</a> &nbsp; 
		<a href="admincp.php?ac=post&&perpage=20&tagid=$mtag[tagid]&searchsubmit=1" class="submit">回帖管理</a>
		</td>
	</tr>
	</table>

<!--{elseif $_GET['subop'] == 'invite'}-->

<div id="content" style="width: 640px;">
	<div class="h_status">
		您可以给未加入本群组的好友们发送邀请。
	</div>
	
	<div class="h_status">
		<!--{if $list}-->
		<ul class="avatar_list">
		<!--{loop $list $value}-->
			<li><div class="avatar48"><a href="space.php?uid=$value[fuid]" title="{$_SN[$value[fuid]]}"><img src="<!--{avatar($value[fuid],small)}-->" alt="{$_SN[$value[fuid]]}" class="avatar" /></a></div>
				<p>
				<a href="space.php?uid=$value[fuid]" title="{$_SN[$value[fuid]]}">{$_SN[$value[fuid]]}</a>
				</p>
				<p><!--{if empty($joins[$value[fuid]])}--><input type="checkbox" name="ids[]" value="$value[fuid]">选定<!--{else}-->已邀请<!--{/if}--></p>
			</li>
		<!--{/loop}-->
		</ul>
		<div class="page">$multi</div>
		<!--{else}-->
		<div class="c_form">还没有好友。</div>
		<!--{/if}-->
	</div>
	<p>
		<input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'ids')">全选 &nbsp;
		<input type="submit" name="invitesubmit" value="邀请" class="submit" />
	</p>
</div>

<div id="sidebar" style="width: 150px;">
	<div class="cat">
		<h3>好友分类</h3>
		<ul class="post_list line_list">
			<li<!--{if $_GET[group]==-1}--> class="current"<!--{/if}-->><a href="cp.php?ac=mtag&tagid=$mtag[tagid]&op=manage&subop=invite&group=-1">全部好友</a></li>
			<!--{loop $groups $key $value}-->
			<li<!--{if $_GET[group]==$key}--> class="current"<!--{/if}-->><a href="cp.php?ac=mtag&tagid=$mtag[tagid]&op=manage&subop=invite&group=$key">$value</a></li>
			<!--{/loop}-->
		</ul>
	</div>
</div>
		
<!--{elseif $_GET['subop'] == 'members'}-->
	
<div id="content" style="width: 640px;">

	<div class="h_status">
		选择相应的用户进行用户等级变更。
	</div>
	
	<div class="h_status">
		<!--{if $list}-->
		<ul class="avatar_list">
		<!--{loop $list $value}-->
			<li><div class="avatar48"><a href="space.php?uid=$value[uid]" target="_blank"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" class="avatar" /></a></div>
				<p><a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a></p>
				<p><input type="checkbox" name="ids[]" value="$value[uid]">选定</p>
			</li>
		<!--{/loop}-->
		</ul>
		<div class="page">$multi</div>
		<!--{else}-->
		<div class="c_form">还没有相关成员。</div>
		<!--{/if}-->
	</div>
	<p>
		<input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'ids')">全选 &nbsp;
		设为：
		<select name="newgrade">
			<!--{if $mtag[grade]==9}-->
			<option value="9">主群主</option>
			<option value="8">副群主</option>
			<!--{/if}-->
			<option value="1">明星成员</option>
			<option value="0">普通成员</option>
			<option value="-1">禁止发言</option>
			<option value="-2">待审核成员</option>
			<option value="-9">踢出群组</option>
		</select>  &nbsp;
		<input type="submit" name="memberssubmit" value="提交" class="submit" />
	</p>
</div>

<div id="sidebar" style="width: 150px;">
	<div class="cat">
		<h3>成员级别</h3>
		<ul class="post_list line_list">
			<li<!--{if $_GET[grade]==-2}--> class="current"<!--{/if}-->><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=members&grade=-2">待审核</a></li>
			<li<!--{if $_GET[grade]==0}--> class="current"<!--{/if}-->><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=members&grade=0">普通成员</a></li>
			<li<!--{if $_GET[grade]==9}--> class="current"<!--{/if}-->><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=members&grade=9">群主</a></li>
			<li<!--{if $_GET[grade]==8}--> class="current"<!--{/if}-->><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=members&grade=8">副群主</a></li>
			<li<!--{if $_GET[grade]==1}--> class="current"<!--{/if}-->><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=members&grade=1">明星成员</a></li>
			<li<!--{if $_GET[grade]==-1}--> class="current"<!--{/if}-->><a href="cp.php?ac=mtag&op=manage&tagid=$mtag[tagid]&subop=members&grade=-1">禁言成员</a></li>
		</ul>
	</div>
</div>

<!--{elseif $_GET['subop'] == 'member'}-->

	<table cellspacing="3" cellpadding="3" width="300">
	<tr><td>操作用户</td><td>{$_SN[$tagspace[uid]]}</td>
	</tr><tr><td>设置等级</td>
	<td>
	<select name="grade">
		<option value="9"$grades[9]>主群主</option>
		<option value="8"$grades[8]>副群主</option>
		<option value="1"$grades[1]>明星成员</option>
		<option value="0"$grades[0]>普通成员</option>
		<option value="-1"$grades[-1]>禁止发言</option>
		<option value="-2"$grades[-2]>待审核成员</option>
		<option value="-9">踢出群组</option>
	</select>
	<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
	<button name="membersubmit" type="submit" class="submit" value="true">确定</button>
	</td></tr></table>
	
<!--{/if}-->

<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>

<!--{elseif $_GET[op]=='mtaginvite'}-->

<h2 class="title"><img src="image/app/mtag.gif" />群组邀请</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li class="active"><a href="cp.php?ac=mtag&op=mtaginvite"><span>群组邀请</span></a></li>
		<li><a href="space.php?do=mtag"><span>返回我的群组</span></a></li>
	</ul>
</div>

<div class="h_status">
	您的好友邀请您加入以下群组
	<!--{if $invites}-->
		<span class="pipe">|</span>
		<a href="cp.php?ac=mtag&op=inviteconfirm&tagid=0&r=0"><span>忽略所有邀请</span></a>
	<!--{/if}-->
</div>

<div class="c_form">
	<!--{if $invites}-->
	<table cellspacing="4" cellpadding="4" class="formtable">
	<!--{loop $invites $value}-->
	<tr>
		<td width="80">
		<div class="threadimg60"><a href="space.php?do=mtag&tagid=$value[tagid]" target="_blank"><img src="$value[pic]" width="60"></a></div></td>
		<td class="h_status">
			<p><a href="space.php?do=mtag&tagid=$value[tagid]" target="_blank" style="font-size:14px;font-weight:bold;">$value[tagname]</a> (已有 $value[membernum] 人<!--{if $value[viewperm]}-->, 只对会员开放浏览<!--{/if}-->)</p>
			$value[title]
			<br>邀请好友：<a href="space.php?uid=$value[fromuid]" target="_blank">{$_SN[$value[fromuid]]}</a>
			<br>邀请时间：<!--{date('Y-m-d H:i', $value[dateline], 1)}-->
		</td>
		<td><a href="cp.php?ac=mtag&op=inviteconfirm&tagid=$value[tagid]&r=1" class="submit">确认邀请</a> <a href="cp.php?ac=mtag&op=inviteconfirm&tagid=$value[tagid]&r=0" class="button">忽略</a></td>
	</tr>
	<!--{/loop}-->
	</table>
	<!--{else}-->
	暂时没有新的群组邀请。
	<!--{/if}-->
</div>	

<!--{elseif $_GET[op]=='join'}-->

<div id="$tagid" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<form id="joinform_{$tagid}" name="joinform_{$tagid}" method="post" action="cp.php?ac=mtag&op=join&tagid=$tagid">
	<h1>确定加入该群组吗？</h1>
	<p class="btn_line">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<!--{if $_SGLOBAL[inajax]}-->
		<input type="hidden" name="joinsubmit" value="true" />
		<input type="button" name="joinsubmit_btn" value="加入" class="submit" onclick="ajaxpost('joinform_{$tagid}', '$tagid', 'mtag_join')" />&nbsp;
		<button name="btncancel" type="button" class="button" onclick="hideMenu()">取消</button>
		<!--{else}-->
		<input type="submit" name="joinsubmit" value="加入" class="submit" />
		<!--{/if}-->
	</p>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{elseif $_GET[op]=='out'}-->

<div id="$mtag[tagid]" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<form id="outform" name="outform" method="post" action="cp.php?ac=mtag&op=out&tagid=$mtag[tagid]">
	<h1>确定要退出该群组吗？</h1>
	<p class="btn_line">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="submit" name="outsubmit" value="退出" class="submit" />
		<!--{if $_SGLOBAL[inajax]}-->
		<input type="hidden" name="outsubmit" value="true" />
		<button name="btncancel" type="button" class="button" onclick="hideMenu()">取消</button>
		<!--{/if}-->
	</p>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{elseif $_GET[op]=='apply'}-->

<div id="$tagid" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<!--{if $_SGLOBAL[inajax]}-->
	<div class="popupmenu_border">
	<h1>申请群主</h1>
	<a href="javascript:hideMenu();" class="float_del" title="关闭">关闭</a>
	<div class="popupmenu_inner">
<!--{/if}-->
	<form id="pmapplyform_{$tagid}" name="pmapplyform_{$tagid}" method="post" action="cp.php?ac=mtag&op=apply&tagid=$tagid">
		<table cellspacing="0" cellpadding="3">
			<tr><td>请输入您申请群主的理由，您的申请会以短消息的方式发送给群主管理员。</td></tr>
			<tr>
				<td><textarea id="message" name="message" cols="40" rows="4" tabindex="3" style="width: 400px; height: 150px;" onkeydown="ctrlEnter(event, 'pmsubmit_btn');"></textarea></td>
			</tr>
			<tr>
				<td>
				<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
				<input type="hidden" name="pmsubmit" value="true" />
				<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
				<!--{if $_SGLOBAL[inajax]}-->
				<input type="button" name="pmsubmit_btn" id="pmsubmit_btn" value="申请" tabindex="4" class="submit" onclick="ajaxpost('pmapplyform_{$tagid}', '$tagid')" />
				<!--{else}-->
				<input type="submit" name="pmsubmit_btn" id="pmsubmit_btn" value="申请" tabindex="4" class="submit" />
				<!--{/if}-->
				</td>
			</tr>
		</table>
	</form>
<!--{if $_SGLOBAL[inajax]}--></div></div><!--{/if}-->
</div>


<!--{else}-->

<h2 class="title"><img src="image/app/mtag.gif" />群组</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li class="active"><a href="cp.php?ac=mtag"><span>创建新群组</span></a></li>
		<li><a href="cp.php?ac=thread"><span>发表新话题</span></a></li>
		<li><a href="space.php?do=mtag"><span>返回我的群组</span></a></li>
	</ul>
</div>

<!--{if $_GET[op]=='multiresult'}-->

	<div class="c_form">
	<table cellspacing="0" cellpadding="0" class="formtable">
		<caption>
			<h2>您已经成功加入以下群组</h2>
			<p>现在，您就可以立即访问以下群组，与志同道合的朋友一起交流话题了。</p>
		</caption>
		<!--{loop $mtags $value}-->
		<tr>
			<td><a href="space.php?do=mtag&tagid=$value[tagid]" target="_blank">$value[tagname]</a></td>
			<td>$value[membernum] 位成员</td>
			<td><a href="space.php?do=mtag&tagid=$value[tagid]" class="submit">立即访问本群组</a></td>
		</tr>
		<!--{/loop}-->
	</table>
	</div>

<!--{elseif $_GET[op]=='confirm'}-->

<!--{if $findmtag}-->

	<div class="c_form">
	<table cellspacing="0" cellpadding="0" class="formtable">
		<tr><td width="90"><div class="threadimg60"><img src="$findmtag[pic]" width="60" height="60"></div></td><td>
			群组 <a href="space.php?do=mtag&tagid=$findmtag[tagid]" target="_blank">$findmtag[tagname]</a> 已经存在
			<br>已有 $findmtag[membernum] 人参与
			<br><br><a href="space.php?do=mtag&tagid=$findmtag[tagid]" class="submit">访问群组</a>
		</td></tr>
	</table>
	</div>
	
<!--{else}-->

	<form method="post" action="cp.php?ac=mtag" class="c_form">
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<input type="hidden" name="fieldid" value="$fieldid">
	<!--{if $likemtags}-->
	<table cellspacing="0" cellpadding="0" class="formtable">
		<caption>
			<h2>相似热门群组推荐</h2>
			<p>以下热门的群组与您要创建的群组很接近，您可以不用创建新群组，而选择直接加入热门群组来与更多人一起讨论话题。</p>
		</caption>
		<!--{loop $likemtags $value}-->
		<tr>
			<td><a href="space.php?do=mtag&tagid=$value[tagid]" target="_blank">$value[tagname]</a></td>
			<td>$value[membernum] 位成员</td>
			<td>
				<a href="space.php?do=mtag&tagid=$value[tagid]" target="_blank">立即访问本群组</a>
				<span class="pipe">|</span>
				<!--{if $value['joinperm'] < 2}-->
				<a href="cp.php?ac=mtag&op=join&tagid=$value[tagid]" id="mtag_like_$value[tagid]" onclick="ajaxmenu(event, this.id, 99999)">选择加入该群组</a>
				<!--{else}-->
				<strong>本群组需要群主邀请才可加入</strong>
				<!--{/if}-->
			</td>
		</tr>
		<!--{/loop}-->
	</table>
	<!--{/if}-->
	<table cellspacing="0" cellpadding="0" class="formtable">
		<caption>
			<h2>确认创建新群组吗？</h2>
		</caption>
		<tr>
			<th width="120">群组分类</th>
			<td>[{$_SGLOBAL['profield'][$profield[upid]][title]}] <strong>$profield[title]</strong></td>
		</tr>
		<tr>
			<th width="120">要创建的群组名称</th>
			<td>$newtagname</td>
		</tr>
		<tr>
			<td></td><td>
				<input type="hidden" name="tagname[$fieldid]" value="$newtagname">
				<input type="hidden" name="joinmode" value="1">
				<input type="submit" id="mtagsubmit" name="mtagsubmit" value="创建群组" class="submit"></td>
		</tr>
	</table>
	</form>
<!--{/if}-->

<!--{else}-->

	<form method="post" action="cp.php?ac=mtag&fieldid=$fieldid" class="c_form">
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<table cellspacing="6" cellpadding="6" class="formtable">
	<caption>
		<h2>创建新群组</h2>
		<p>您可以自由创建一个群组，来与组内的成员进行交流讨论。</p>
	</caption>
	<tr>
		<td>
			<div class="l_status">1. <strong>请选择一个群组分类</strong></div>

			<div>
				<select name="upid" id="selectTypeTop" onchange="fieldselectcheck(this.value);">
					<option value="0">选择大项</option>
				</select>
				=>
				<select name="fieldid" id="selectTypeSecond" onchange="fieldselect(this.value);">
					<option value="0">请选择小项</option>
				</select>

			</div>
			
		</td>
	</tr>
	<!--{loop $fields $key $value}-->
	<tbody id="tbody_field_$key" style="display:none;">
	<!--{if $value[note]}-->
	<tr>
		<td><div class="notice">$value[note]</div></td>
	</tr>
	<!--{/if}-->
	<!--{if $value['formtype']=='multi'}-->
	<tr>
		<td>
		<div class="l_status">2. <strong>选择要加入的群组</strong></div>
		<table><tr>
		<!--{loop $value['choice'] $sk $sv}-->
		<td><input type="checkbox" name="tagname[$key][]" value="$sv" <!--{if in_array($sv, $existmtag)}-->checked disabled<!--{/if}-->> $sv</td>
		<!--{if $sk%3==2}--></tr><tr><!--{/if}-->
		<!--{/loop}-->
		</tr></table>
		</td>
	</tr>
	<!--{elseif $value['formtype']=='select'}-->
	<tr>
		<td>
		<div class="l_status">2. <strong>选择要加入的群组</strong></div>
		<select name="tagname11[$key]">
		<!--{loop $value['choice'] $sk $sv}-->
		<option value="$sv" <!--{if in_array($sv, $existmtag)}-->selected disabled<!--{/if}-->>$sv</option>
		<!--{/loop}-->
		</select>
		</td>
	</tr>
	<tr>
	<td><div class="l_status">2. <strong>设置要创建的群组名称</strong></div>
		<input type="text" name="tagname[$key]" value="" class="t_input"></td>
	</tr>
	<!--{else}-->
	<tr>
		<td>
		<div class="l_status">2. <strong>设置要创建的群组名称</strong></div>
		<input type="text" name="tagname[$key]" value="" class="t_input"></td>
	</tr>
	<!--{/if}-->
	</tbody>
	<!--{/loop}-->
	<tbody id="tbody_submit" style="display:none;">
	<tr>
		<td><input type="submit" id="mtagsubmit" name="mtagsubmit" value="提交" class="submit"></td>
	</tr>
	</tbody>
	</table>
	</form>
	
	
	<script>
	var lastfieldid = 0 ;
	function fieldselect(fieldid) {
		if(lastfieldid != 0 ){
			$('tbody_field_'+ lastfieldid).style.display = 'none';
			$('tbody_submit').style.display='none';
		}
		lastfieldid = fieldid ;
		
		if(fieldid && fieldid!=0) {
			$('tbody_field_'+fieldid).style.display = '';
			$('tbody_submit').style.display='';
		}
	}
	
	function fieldselectcheck(id){
		if((id == 0 || id == '0') && lastfieldid!=0){
			$('tbody_field_'+ lastfieldid).style.display = 'none';
			$('tbody_submit').style.display='none';
		}
	}
	
	coreTypeJs = <!--{$json_core_type}--> ;
	showCoreSelect('selectTypeTop','selectTypeSecond') ;
			
	</script>

<!--{/if}-->

<!--{/if}-->
<!--{template footer}-->